package Couistot;
import java.io.Serializable;

import CouistotEnum.EmplacementsResto;
import CouistotEnum.FormeTables;

@SuppressWarnings("serial")
public class TableResto implements Serializable, Couistot{
	private int numeroTable;
	private EmplacementsResto emplacement;
	private FormeTables forme;
	private int nombrePlaces;
	private int nbPlaceReservees;
	private boolean reservee;
	
	public TableResto(){
		numeroTable=0;
		emplacement=null;
		forme=null;
		nombrePlaces=0;
		nbPlaceReservees=0;
		reservee=false;
	}
	
	public TableResto(int tNumeroTable, EmplacementsResto tEmplacement, FormeTables tForme, int tNombrePlaces, int tNbPlaceReservees, boolean tReservee) {
		numeroTable=tNumeroTable;
		emplacement=tEmplacement;
		forme=tForme;
		nombrePlaces=tNombrePlaces;
		nbPlaceReservees=tNbPlaceReservees;
		reservee=tReservee;
	}

	public int getNumeroTable() {
		return numeroTable;
	}

	public void setNumeroTable(int numeroTable) {
		this.numeroTable = numeroTable;
	}

	public EmplacementsResto getEmplacement() {
		return emplacement;
	}

	public void setEmplacement(EmplacementsResto emplacement) {
		this.emplacement = emplacement;
	}

	public FormeTables getForme() {
		return forme;
	}

	public void setForme(FormeTables forme) {
		this.forme = forme;
	}

	public int getNombrePlaces() {
		return nombrePlaces;
	}

	public void setNombrePlaces(int nombrePlaces) {
		this.nombrePlaces = nombrePlaces;
	}

	public int getNbPlaceReservees() {
		return nbPlaceReservees;
	}

	public void setNbPlaceReservees(int placesDispos) {
		this.nbPlaceReservees = placesDispos;
	}

	public boolean isReservee() {
		return reservee;
	}

	public void setReservee(boolean reservee) {
		this.reservee = reservee;
	}
	
	public int calculPlaceDispo() {
		return(this.nombrePlaces-this.nbPlaceReservees);
	}

	public String toString2() { //TableResto
		return "Table"+this.numeroTable;
	}

}
